package com.emar.adx.yiqifa.dao;

import com.mongodb.DB;
import com.mongodb.DBCollection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.stereotype.Repository;
import org.springframework.util.ReflectionUtils;

import java.util.List;

/**
 * Created by Administrator on 2015/11/17.
 */
//@Repository
public class MongoDBDao<T>{

    @Autowired
    private MongoTemplate mongoTemplate;

    public Object findOne(Query query) {
        return null;
    }

    public DB getDB(){
        return mongoTemplate.getDb();
    }

    public DBCollection getCollection(String name){
        return mongoTemplate.getCollection(name);
    }

}
